package com.gamesa.osb.reports.utils;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.gamensa.osb.reports.model.OSBData;

public class DataOSBMapper implements RowMapper<OSBData> {
	/**   * Creates a Widget from a ResultSet   */  
	public OSBData mapRow(ResultSet rs, int rowNum)  {  
		
		OSBData data = new OSBData();    
		try    
		{            
			data.setApplication(rs.getString("INBOUND_SERVICE_URI"));
			data.setService(rs.getString("MSG_LABELS"));
			data.setAccess(rs.getLong("ACCESOS"));
		}    
		catch (SQLException e)    
		{      
			e.printStackTrace();
		} catch (Exception e){
			e.printStackTrace();
		}
		
		return data;
	}
}
